import QtQuick 2.6
import QtQuick.Layouts 1.2

import "../../Base/UiBase"
import "../../Base/Config"

import Data 1.0

import "../../Evaluation/P2p/Teachers" as EVTeachers

Rectangle {
    id: root

    color: Color.background

    MouseArea {
        z: -1
        anchors.fill: parent
    }

    ColumnLayout {
        anchors.fill: parent
        spacing: 0

        // header
        Rectangle {
            Layout.fillWidth: true
            Layout.preferredHeight: 96 * Size.ratio
            color: Color.foreground

            // back button
            ImageButton {
                width: 80 * Size.ratio
                height: 96 * Size.ratio
                anchors.left: parent.left
                anchors.verticalCenter: parent.verticalCenter
                source: "../../../resources/comment/fanhiu01.svg"

                onClicked: root.visible = false
            } // end back button

            Text {
                anchors.centerIn: parent
                text: "专评"
                color: Color.input
                font.pixelSize: Size.titleFont
            }
            BottomDivider {
            }
        } // end header

        // body
        ListView {
            Layout.fillWidth: true
            Layout.fillHeight: true
            z: -1
            model: ListModel {
                id: listmodel
                Component.onCompleted: {
                    listmodel.append({
                                         name: "0403",
                                         head: "../../../resources/tests/Beautiful Notebook.PNG",
                                         unit: qsTr("特圈"),
                                         level: qsTr("学生"),
                                         school: qsTr("广西师范大学"),
                                         major: qsTr("钢琴专业"),
                                         detail: "11111111111111111111111111111111111111111111111111111111111aaaaaaaaaaaaaaaaaaa啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊  ",
                                         evaluated: 1234,
                                         acceptedEvaluation: 1222
                                     })
                    listmodel.append({
                                         name: "Happy0403",
                                         head: "../../../resources/tests/Beautiful Notebook.PNG",
                                         unit: qsTr("特圈"),
                                         level: qsTr("学生"),
                                         school: qsTr("广西师范大学"),
                                         major: qsTr("钢琴专业"),
                                         detail: "11111111111111111111111111111111111111111111111111111111111aaaaaaaaaaaaaaaaaaa",
                                         evaluated: 300,
                                         acceptedEvaluation: 276
                                     })
                    listmodel.append({
                                         name: "HappyZh",
                                         head: "../../../resources/tests/Beautiful Notebook.PNG",
                                         unit: qsTr("特圈"),
                                         level: qsTr("学生"),
                                         school: qsTr("广西师范大学"),
                                         major: qsTr("钢琴专业"),
                                         detail: "11111111111111111111111111111111111111111111111111111111111aaaaaaaaaaaaaaaaaaa",
                                         evaluated: 99,
                                         acceptedEvaluation: 88
                                     })
                }
            }
            delegate: EVTeachers.Teacher {
                Menu {
                }
            }
        } // end body
    }
}
